home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Columbia Kermit
/
kermit.zip
/
newsgroups
/
misc.19950528-19950726
/
000041_news@columbia.edu_Thu Jun 1 14:23:26 1995.msg
< prev
next >
Wrap
Internet Message Format
|
2020-01-01
|
3KB
Received: from apakabar.cc.columbia.edu by watsun.cc.columbia.edu with SMTP id AA09230
(5.65c+CU/IDA-1.4.4/HLK for <kermit.misc@watsun.cc.columbia.edu>); Fri, 2 Jun 1995 20:38:00 -0400
Received: by apakabar.cc.columbia.edu id AA06247
(5.65c+CU/IDA-1.4.4/HLK for kermit.misc@watsun); Fri, 2 Jun 1995 20:37:59 -0400
Path: news.columbia.edu!sol.ctr.columbia.edu!howland.reston.ans.net!math.ohio-state.edu!uwm.edu!lll-winken.llnl.gov!osi-east2.es.net!oracle.pnl.gov!mica.inel.gov!pmafire!mars.poci.amis.com!cwis.isu.edu!news.cc.utah.edu!news.cs.utah.edu!cc.usu.edu!jrd
From: jrd@cc.usu.edu (Joe Doupnik)
Newsgroups: comp.protocols.kermit.misc
Subject: Re: Piping output from "rem host" command
Message-Id: <1995Jun1.202326.53054@cc.usu.edu>
Date: 1 Jun 95 20:23:26 MDT
References: <Pine.PCP.3.91.950531154729.6366A-100000-100000-100000@[141.218.24.34]>
Organization: Utah State University
Lines: 33
Apparently-To: kermit.misc@watsun.cc.columbia.edu
In article <Pine.PCP.3.91.950531154729.6366A-100000-100000-100000@[141.218.24.34]>, "John D. Tucker" <tucker@mickey.acs.wmich.edu> writes:
>
>
> I would like to send a command to a remote computer and capture a brief
> (one line of characters) response from that computer for processing
> within a script. Reading the "Using MS-DOS Kermit" manual, I found that
> rem host [command] > d:\log\remote.out
> would capture the output from "[command]" in the file "d:\log\remote.out".
> However, when using the pipe symbol (instead of the redirection symbol),
> the symbol gets sent to the remote host rather than piping the output to
> some program.
------------
Piping will never work because it presumes that programs are
under control of the current Command.com and use stdin/stdout to read
and write. DOS uses a file to represent the pipe. In addition, MS-DOS Kermit
server (the receiving end of the initial command) performs remote host
commands by invoking command.com #2 with the command line supplied by the
client, and the output is redirected to a temporary file. The temp file is
necessary so Kermit can read the results, if any, and send them back to the
client. That means there is already a redirection supplied by Kermit, and
it means Command.com #2 is not in charge of Kermit.
If you supply a redirection then that is sent to the remote host
(Kermit server) and the file to which you write is on that host too. MSK
does not know you have supplied redirection so MSK reads only it's own
temp file.
The material comes back as a file, and we can't stuff a file into
a Kermit variable. You can "get filename" and obtain a local file copy
to which you may apply Kermit script string operations (read, string ops,
etc). Be aware that most DOS programs do not use stdin/stdout to work.
They go straight to hardware and below the Bios, so you won't capture much
in that redirection, and you can lock up the server machine while the target
program waits on the real keyboard, etc.
Joe D.